﻿@*@if (Request.IsAuthenticated) {
    <text>
        Hello, 
        @Html.ActionLink(User.Identity.Name, "Profile", "Account",  new {name = User.Identity.Name.ToString()}, null)!
        @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) {
        @Html.AntiForgeryToken()
            <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
        }
    </text>
} else {
       <ul>
           <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>  
       </ul>
}*@

@if(Request.IsAuthenticated){
    <img src="~/Images/no-profile-man-medium.jpg" alt="UserPhoto"/>
    <p>
        @Html.ActionLink(User.Identity.Name, "Profile", "Account", new{name = User.Identity.Name.ToString()}, null)
        @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new{ id="logoutForm"})){
            @Html.AntiForgeryToken()
            <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
        }
    </p>
}
else
{
    <p>
        @Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new{ id="loginLink"})
    </p>
}